from django.test import TestCase


# Create your tests here.

# 更新关联表
str1 = "<14>Feb 26 17:26:11 kernel: 10201time=1614360371;deviceip=;srcip=192.168.0.126;username=;site=mirrors.aliyun.com;" \
       "uri=/ubuntu/dists/bionic-proposed/universe/i18n/by-hash/SHA256/00ac9bb0096a92c0450f95a6fc10ad34bd1cd52ef"

s = str1.split(" ")
list1 = []
list1.append(s[0]+s[1]+s[2]+s[3])
s = s[4:]
s = str(s)[2:-2].split(";")

for i in range(len(s)):
    if i == len(s)-1:
        list1.append(s[i][4:])
    else:
        x = s[i].split('=')
        if len(x) == 1:
            list1.append(" ")
        else:
            list1.append(x[1])

print(list1)
print(s)
